<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>

<div>
    <logic:present name="acc">
        <logic:equal name="roleUser" value="tour">
            <p align="right">
                <a href="AdminTour.do?action=listTourOrder" >Order manager</a>&emsp;&emsp;&emsp;
                <a href="AdminTour.do?action=listTour" >tour manager</a>&emsp;&emsp;&emsp;
                <a href="AdminTour.do?action=listTourServices" >Tour Service manager</a> &emsp;&emsp;&emsp;
                <a href="AdminTour.do?action=listTourType" >Tour Type manager</a> &emsp;&emsp;&emsp;
                <a href="AdminTour.do?action=listTourLocation" >Location manager</a>
            </p>
        </logic:equal>
        <logic:present name="listTour">
            <logic:notEmpty name="listTour">

                <table width="100%" border="0">
                    <tr bgcolor="#C2D1D8">
                        <td><font size="3"> Tour id </font> </td>
                        <td><font size="3">Tour name </font> </td>
                        <td<font size="3">Type name </font></td>
                        <td><font size="3">Departure </font></td>
                        <td><font size="3">Destination </font> </td>
                        <td><font size="3"> Duration </font></td>
                        <td><font size="3">Action </font></td>

                    </tr>
                    <logic:iterate name="listTour" id="listTour">
                        <tr bgcolor="#F0F0F0">
                            <td style="background-color:#F0F0F0">
                                <font size="2">  <bean:write name="listTour" property="tourId"/></font>
                            </td>
                            <td style="background-color:#F0F0F0">
                                <font size="2"> <bean:write name="listTour" property="tourName"/> </font>
                            </td>

                            <td style="background-color:#F0F0F0">
                                <font size="2">  <bean:write name="listTour" property="tourTypeDTO.tourTypeName"/></font>
                            </td>

                            <td style="background-color:#F0F0F0">
                                <font size="2"> <bean:write name="listTour" property="departure"/></font>
                            </td>
                            <td style="background-color:#F0F0F0">
                                <font size="2"> <bean:write name="listTour" property="destination"/> </font>
                            </td>
                            <td style="background-color:#F0F0F0">
                                <font size="2"> <bean:write name="listTour" property="duration"/> </font>
                            </td>
                            <td style="background-color:#F0F0F0">
                                <logic:present name="listFunction">
                                    <logic:iterate name="listFunction" id="listF">
                                        <logic:equal name="listF" property="functionId" value="7">
                                            <a href="AdminTour.do?action=addnewTour">
                                                <img title="Add" src="admin/img/action_add.png"  style="cursor:pointer">
                                            </a>
                                        </logic:equal>
                                        <logic:equal name="listF" property="functionId" value="8">
                                            <a href="AdminTour.do?action=editTour&tourId=<bean:write name="listTour" property="tourId"/>">
                                                <img title="Edit" src="admin/img/action_remove.png" style="cursor:pointer"/>
                                            </a>
                                        </logic:equal>
                                        <logic:equal name="listF" property="functionId" value="9">
                                            <a href="AdminTour.do?action=deleteTour&tourId=<bean:write name="listTour" property="tourId"/>">
                                                <img title="Delete" src="admin/img/action_delete.png" name="action" style="cursor:pointer" />
                                            </a>
                                        </logic:equal>
                                    </logic:iterate>
                                </logic:present>
                            </td>
                        </tr>
                    </logic:iterate>
                    <tr bgcolor="#C2D1D8">
                        <td colspan="7"><font color="#C2D1D8">car id </font></td>

                    </tr>
                </table>

            </logic:notEmpty>
            <logic:empty name="listTour">
                ban chi dc xem thong tin ma thoi
            </logic:empty>
        </logic:present>
        <logic:notPresent name="listTour">
            ban chi dc xem thong tin ma thoi
        </logic:notPresent>
    </logic:present>
    <logic:notPresent name="acc">
        <jsp:forward page="adminHome.jsp"/>
    </logic:notPresent>
</div>
